package xyz.lisys.action;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import javax.servlet.http.HttpServletRequest;

@Controller("testAction")
@Scope("prototype")
public class TestAction extends ActionSupport {

    public String jsp() {
        return SUCCESS;
    }

    public String el() {
        return SUCCESS;
    }

    public String ognl() {
        HttpServletRequest request = ServletActionContext.getRequest();
        request.setAttribute("foo", "hello");
        return SUCCESS;
    }

    public String taglib() {
        return SUCCESS;
    }
}
